<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<%@ include file="/common-app/taglibs.jsp"%>
<script type="text/javascript" src="${res}/js/prp_attach.js"></script>
<script type="text/javascript">
function ContentDownDesc(template) {
	window.open("${res_app}/template/content/"
			+ encodeURIComponent(template));

}
</script>
<input id='auditflag' type='hidden' value='${param.auditflag}'>
<div class="t_bar">本申请所需附件清单</div>
<table id="prpContent_upload" label="附件" border="0" cellspacing="0"
	width="100%" cellpadding="0" class="table01 t_css"
	style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr>
			<th width="8%">序号</th>
			<th width="30%">附件名称</th>
			<th width="7%">是否必备材料</th>
			<th width="25%">下载</th>
		</tr>
	</thead>
	<tbody>
		<c:set value="0" var="index" scope="page" />
		<x:forEach select="$xmlData/data/content/content" var="content">
		<tr>
			    <c:set var="seq_no"><x:out select="$content/@seq_no" /></c:set>
				<td align="center">&nbsp;${index+1}<span id="attach_seq${seq_no}" style="display:none">${seq_no}</span></td>
				<td><x:out select="$content/name" />
				<x:forEach select="$content/attach_template" var="attach_template" >
			 	<c:set var="template_file_code"><x:out select="$attach_template/template_file_code" /></c:set>
				<c:set var="template_img"><x:out select="$attach_template/template_img" /></c:set>
				<c:set var="template_sample_word"><x:out select="$attach_template/template_sample_word" /></c:set>
				<c:if test="${not empty template_file_code }">
					&nbsp;&nbsp;<a class="link_x"  href="/egrantweb/file/ajax-filedownload?fileCode=${template_file_code}">
					<img src="${template_img}"/><x:out select="$attach_template/template_name" /></a> 
				</c:if>
				<c:if test="${not empty template_sample_word }">
					&nbsp;&nbsp;<a class="link_x" onclick="return ContentDownDesc('${template_sample_word }');" href="###">
					<img src="${template_img}"/><x:out select="$attach_template/template_name" /></a> 
				</c:if>
				</x:forEach>
				</td>
				<td align="center"><x:out select="$content/berif" /></td>
				
				<td>
				<span id="file_code${seq_no}" style="display:none"><x:out select="$content/file_code" /></span>
				<c:set var="file_code"><x:out select="$content/file_code" /></c:set>
				<c:if test="${file_code!=''}">
				<a id="content_downLoadFile0" href="${ctx}/file/ajax-filedownload?fileCode=${file_code}" class="link_x"><x:out select="$content/file_name" /></a>
				&nbsp;&nbsp;<br>(上传时间<x:out select="$content/file_date" />)</c:if>&nbsp;
			</td>

			</tr>
			<c:set value="${index+1}" var="index" scope="page" />
		</x:forEach>
	</tbody>
</table>
<script type="text/javascript">
$(document).ready(function(){
	$("#prpContent_upload").each(function(){
		$(this).find("tr:even").addClass("li_1");
		$(this).find("tr:odd").addClass("li_2");
	});
});
</script>